# -*- coding: cp1251 -*- 

import sys
sys.path.append("../source")
from etl import *

sourceConn = OracleConnection("QASMDM", "SPUSEROPSIT2", "SPUSEROPSIT2")
targetConn = OracleConnection("DEVMDM", "DEVODMSPOP2", "DEVODMSPOP2")

source = TableSource(sourceConn, "UD_SITE_SCHEDULE")
target = CSVTarget("UD_SITE_SCHEDULE.csv", writeSpec=True)
FieldsPump(source, target)()

target = TableTarget(targetConn, "UD_SITE_SCHEDULE")
target.setPreSql(['delete from ud_site_schedule'])
FieldsPump(source, target)()

